package com.example.shop.service.impl;

import com.example.shop.domain.Order;
import com.example.shop.repository.OrderRepository;
import com.example.shop.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService{

    @Autowired
    private OrderRepository orderRepository;

    @Override
    public Page<Order> findList(Pageable pageable) {
        return  orderRepository.findAll(pageable);
    }

    @Override
    public Order findOne(String orderId) {
        return orderRepository.findOne(orderId);
    }
}
